package com.xjscrm.console.mapper;

import com.xjscrm.common.entity.WwDevice;
import com.xjscrm.console.param.wwDevice.WwDeviceQuery;
import com.xjscrm.console.vo.WwDeviceVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface WwDeviceMapper extends CommonMapper<WwDevice> {
    List<WwDeviceVo> getWwDeviceList(WwDeviceQuery wwDeviceQuery);

    Integer onlineWwDeviceNum(Long merId);

    WwDevice getById(@Param("id") Long deviceUniqueId, @Param("merId") Long merId);

    Integer countWwDeviceByMerId(Long merId);

    List<WwDevice> selectList(@Param("param") WwDeviceQuery wwDeviceQuery);

    WwDevice selectByDeviceId(@Param("merId") Long merId, @Param("deviceId") String deviceId);

    WwDevice getByName(@Param("deviceName") String deviceUniqueKeyword, @Param("merId") Long merId);

    WwDevice selectById(@Param("merId") Long merId, @Param("id") Long id);

    List<WwDevice> selectByIds(@Param("merId") Long merId, @Param("ids") List<Long> deviceUniqueIds);

    List<WwDevice> selectByMerId(Long merId);

    void updateWwDevice(WwDevice wwDevice);

    WwDevice getByDeviceId(@Param("deviceId") String deviceId, @Param("merId") Long merId);

    Integer getCountByCorpId(@Param("corpId") String corpId, @Param("merId") Long merId);
}
